package cn.tq.pethome.shop.controller;

import cn.tq.pethome.shop.domain.Shop;
import cn.tq.pethome.shop.service.IShopService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/shop")
@Api(value = "店铺名称的API",description="店铺相关的CRUD功能")
public class ShopController {
    
    @Autowired
    private IShopService shopService;

    /**
     * 查询所有数据
     * @return
     */
    @GetMapping
    @ApiOperation(value = "查询所有数据" )
    public List<Shop> shops() {
        return shopService.findAll();
    }


}
